package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 区域数据传输对象
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 */
@Data
@Schema(description = "区域信息DTO")
public class RegionDTO {

    @Schema(description = "区域ID")
    private Long id;

    @Schema(description = "区域编码", required = true)
    @NotBlank(message = "区域编码不能为空")
    @Size(max = 50, message = "区域编码长度不能超过50个字符")
    private String regionCode;

    @Schema(description = "区域名称", required = true)
    @NotBlank(message = "区域名称不能为空")
    @Size(max = 100, message = "区域名称长度不能超过100个字符")
    private String regionName;

    @Schema(description = "父区域ID，0表示顶级区域")
    private Long parentId;

    @Schema(description = "区域层级：1-5", required = true)
    @NotNull(message = "区域层级不能为空")
    private Integer regionLevel;

    @Schema(description = "区域类型：1-省，2-市，3-区县，4-街道，5-社区", required = true)
    @NotNull(message = "区域类型不能为空")
    private Integer regionType;

    @Schema(description = "面积（平方公里）")
    private BigDecimal area;

    @Schema(description = "人口数量")
    private Integer population;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序字段")
    private Integer sortOrder;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;
} 